# Credit where credit is due:
# http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/

# NOTE: if you find some weird behavior when trying out new conf,
# try to first kill-server and retry

unbind C-b
# set -g prefix C-a
# # press C-a twice to go to begining of the line
# bind-key C-a send-prefix

# set up new Control key to Caps Lock follow
# https://mutelight.org/caps-lock
# Basically, you need to first download PCKeyboardHack first
# then configure Caps Lock to F10 by launching seil from applications
# Change Caps Lock key to keycode as 109
# Note: in order to for this to work for terminal, you need to set
# Terminalinf as "Declare terminal as xterm-256-color" otherwise,
# function key will be sent as ascii code
set -g prefix F10
bind-key F10 last-window

set -g mode-keys vi

# Styles the pane borders
set -g pane-border-fg green
set -g pane-border-bg black

# Styles the active pane border. Helps when you have
# more than two panes.
set -g pane-active-border-fg white
set -g pane-active-border-bg yellow

# switch panes using Alt-arrow without prefix
# For macbook make sure you enabled meta key
# using Option key from keyboard setting
bind h select-pane -L
bind l select-pane -R
bind k select-pane -U
bind j select-pane -D

# Enable mouse control
# ! note: this will mess around mouse key in terminal
# and you won't be able to select text uing mouse
# set -g mouse-select-pane on
# set -g mouse-resize-pane on

# don't rename windows automatically
set-option -g allow-rename off

# split panes using | and -
unbind %
unbind '"'
bind \ split-window -h
bind - split-window -v


# clear screen buffer
# bind -n C-k send-keys -R \; clear-history
